package com.dc.business.datacollectbusiness.service.impl;

import com.dc.business.datacollectbusiness.entity.CompanyUserRelationShip;
import com.dc.business.datacollectbusiness.mapper.CompanyMapper;
import com.dc.business.datacollectbusiness.mapper.CompanyUserRelationShipMapper;
import com.dc.business.datacollectbusiness.service.CompanyUserRelationShipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanyUserRelationShipServiceImpl implements CompanyUserRelationShipService {

    @Autowired
    private CompanyUserRelationShipMapper companyUserRelationShipMapper;

    @Override
    public List<CompanyUserRelationShip> getAllCompanyIdByUserid(int userid) {
        return companyUserRelationShipMapper.getAllCompanyIdByUserid(userid);
    }

    @Override
    public boolean insertCompanyUserRelationShip(CompanyUserRelationShip companyUserRelationShip) {
        return companyUserRelationShipMapper.insertCompanyUserRelationShip(companyUserRelationShip);
    }

    @Override
    public boolean deleteCompanyUserRelationShipByuserID(int userId) {
        return companyUserRelationShipMapper.deleteCompanyUserRelationShipByuserID(userId);
    }
}
